<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition template="/views/templates/main.xhtml">
	<ui:define name="body">
		<style>
.navigation .rf-tab-hdr-brd,.navigation .rf-tab {
	display: none;
}
.label {
    font-weight: bold;
}
.acent{
      text-align: center;
}
</style>
		<h:form>
			<rich:panel>
				<f:facet name="header">
					<h:panelGroup>
						<h:outputText value="Apuesta realizada!" />
					</h:panelGroup>
				</f:facet>
				<h:panelGrid columns="3">
					<h:outputText value="Usuario:" styleClass="label"/>
					<h:outputText value="#{userBean.name} #{userBean.surname}"/>
					<br />
					<h:outputText value="Correo:" styleClass="label"/>
					<h:outputText value="#{userBean.mail}"/>
					<br />
					<h:outputText value="Balance:" styleClass="label"/>
					<h:outputText value="#{userAccountBean.userBalance}"/>
					<br />
					
        		<h:panelGrid columnClasses="acent">
					<rich:dataScroller for="table" maxPages="5" />
				        <rich:dataTable value="#{userAccountBean.lastUserBets}" var="bet"
				            id="table" rows="10">
				            <rich:column>
				                <f:facet name="header">
				                    <h:outputText value="Evento" />
				                </f:facet>
				                <h:outputText value="#{bet.eventTypeName}/#{bet.eventName}//#{bet.marketName}" />
				            </rich:column>
				            <rich:column>
				                <f:facet name="header">
				                    <h:outputText value="Apuesta" />
				                </f:facet>
				                <h:outputText value="#{bet.marketResultName}" />
				            </rich:column>
				            <rich:column>
				                <f:facet name="header">
				                    <h:outputText value="Monto" />
				                </f:facet>
				                <h:outputText value="#{bet.amountFormatted}" />
				            </rich:column>
				            <rich:column>
				                <f:facet name="header">
				                    <h:outputText value="Fecha Apuesta" />
				                </f:facet>
				                <h:outputText value="#{bet.dateFormatted}" />
				            </rich:column>
				             <rich:column>
				                <f:facet name="header">
				                    <h:outputText value="combinada" />
				                </f:facet>
				                <h:outputText value="#{bet.compositeId}" />
				            </rich:column>
				            <rich:column>
				                <f:facet name="header">
				                    <h:outputText value="Ganancia" />
				                </f:facet>
				                <h:outputText value="#{bet.resultFormatted}" />
				            </rich:column>
				        </rich:dataTable>
				    <rich:dataScroller for="table" maxPages="5" />
				    </h:panelGrid>
				</h:panelGrid>
			</rich:panel>
			<br />
		</h:form>   
</ui:define>
</ui:composition>
</html>